package com.paperless.sdk;

import static com.mogujie.tt.protobuf.InterfaceMacro.Pb_Error.*;
import static com.mogujie.tt.protobuf.InterfaceMacro.Pb_Method.*;
import static com.mogujie.tt.protobuf.InterfaceMacro.Pb_Type.*;

import com.mogujie.tt.protobuf.InterfaceMacro;

/**
 * @author Created by xlk on 2022/1/11.
 */
public class ErrorRet {

    public static String getTypeMessage(int type) {
        switch (type) {
            case Pb_TYPE_MEET_INTERFACE_INITENV_VALUE:
                return "初始化环境";
            case Pb_TYPE_MEET_INTERFACE_TIME_VALUE:
                return "平台时间 -- 高频回调";
            case Pb_TYPE_MEET_INTERFACE_READY_VALUE:
                return "平台初始化完毕";
            case Pb_TYPE_MEET_INTERFACE_DOWNLOAD_VALUE:
                return "平台下载 -- 高频回调";
            case Pb_TYPE_MEET_INTERFACE_UPLOAD_VALUE:
                return "平台上传 -- 高频回调";
            case Pb_TYPE_MEET_INTERFACE_MEDIAPLAYPOSINFO_VALUE:
                return "平台播放进度通知 -- 高频回调";
            case Pb_TYPE_MEET_INTERFACE_DEVICEINFO_VALUE:
                return "设备";
            case Pb_TYPE_MEET_INTERFACE_DEFAULTURL_VALUE:
                return "会议网页";
            case Pb_TYPE_MEET_INTERFACE_ADMIN_VALUE:
                return "管理员";
            case Pb_TYPE_MEET_INTERFACE_DEVICECONTROL_VALUE:
                return "设备控制";
            case Pb_TYPE_MEET_INTERFACE_PEOPLE_VALUE:
                return "常用人员信息";
            case Pb_TYPE_MEET_INTERFACE_MEMBER_VALUE:
                return "参会人员信息";
            case Pb_TYPE_MEET_INTERFACE_MEMBERGROUP_VALUE:
                return "参会人员分组";
            case Pb_TYPE_MEET_INTERFACE_MEMBERGROUPITEM_VALUE:
                return "参会人员分组人员";
            case Pb_TYPE_MEET_INTERFACE_DEVICEFACESHOW_VALUE:
                return "设备会议信息";
            case Pb_TYPE_MEET_INTERFACE_ROOM_VALUE:
                return "会场";
            case Pb_TYPE_MEET_INTERFACE_ROOMDEVICE_VALUE:
                return "会场设备";
            case Pb_TYPE_MEET_INTERFACE_FILEPUSH_VALUE:
                return "文件推送";
            case Pb_TYPE_MEET_INTERFACE_REQUESTSTREAMPUSH_VALUE:
                return "流请求推送";
            case Pb_TYPE_MEET_INTERFACE_STREAMPUSH_VALUE:
                return "流推送";
            case Pb_TYPE_MEET_INTERFACE_MEETINFO_VALUE:
                return "会议信息";
            case Pb_TYPE_MEET_INTERFACE_MEETAGENDA_VALUE:
                return "会议议程";
            case Pb_TYPE_MEET_INTERFACE_MEETBULLET_VALUE:
                return "会议公告";
            case Pb_TYPE_MEET_INTERFACE_MEETDIRECTORY_VALUE:
                return "会议目录";
            case Pb_TYPE_MEET_INTERFACE_MEETDIRECTORYFILE_VALUE:
                return "会议目录文件";
            case Pb_TYPE_MEET_INTERFACE_MEETDIRECTORYRIGHT_VALUE:
                return "会议目录权限";
            case Pb_TYPE_MEET_INTERFACE_MEETVIDEO_VALUE:
                return "会议视频";
            case Pb_TYPE_MEET_INTERFACE_MEETTABLECARD_VALUE:
                return "会议双屏显示";
            case Pb_TYPE_MEET_INTERFACE_MEETSEAT_VALUE:
                return "会议排位";
            case Pb_TYPE_MEET_INTERFACE_MEETIM_VALUE:
                return "会议交流";
            case Pb_TYPE_MEET_INTERFACE_MEETONVOTING_VALUE:
                return "会议发起投票";
            case Pb_TYPE_MEET_INTERFACE_MEETVOTEINFO_VALUE:
                return "会议投票信息";
            case Pb_TYPE_MEET_INTERFACE_MEETVOTESIGNED_VALUE:
                return "会议投票人信息";
            case Pb_TYPE_MEET_INTERFACE_MANAGEROOM_VALUE:
                return "会议管理会场";
            case Pb_TYPE_MEET_INTERFACE_MEETSIGN_VALUE:
                return "会议签到";
            case Pb_TYPE_MEET_INTERFACE_WHITEBOARD_VALUE:
                return "会议白板";
            case Pb_TYPE_MEET_INTERFACE_FUNCONFIG_VALUE:
                return "会议功能配置";
            case Pb_TYPE_MEET_INTERFACE_MEMBERPERMISSION_VALUE:
                return "参会人员权限信息";
            case Pb_TYPE_MEET_INTERFACE_PEOPLEGROUP_VALUE:
                return "常用人员分组";
            case Pb_TYPE_MEET_INTERFACE_PEOPLEGROUPITEM_VALUE:
                return "常用人员分组人员";
            case Pb_TYPE_MEET_INTERFACE_SCREENMOUSECONTROL_VALUE:
                return "屏幕鼠标控制";
            case Pb_TYPE_MEET_INTERFACE_SCREENKEYBOARDCONTROL_VALUE:
                return "屏幕键盘控制";
            case Pb_TYPE_MEET_INTERFACE_DEVICEMEETSTATUS_VALUE:
                return "设备当前会议的一些信息";
            case Pb_TYPE_MEET_INTERFACE_DEVICEOPER_VALUE:
                return "设备交互信息";
            case Pb_TYPE_MEET_INTERFACE_DBSERVERERROR_VALUE:
                return "数据库后台回复错误信息";
            case Pb_TYPE_MEET_INTERFACE_MEDIAPLAY_VALUE:
                return "媒体播放";
            case Pb_TYPE_MEET_INTERFACE_STREAMPLAY_VALUE:
                return "流播放";
            case Pb_TYPE_MEET_INTERFACE_STOPPLAY_VALUE:
                return "流播放";
            case Pb_TYPE_MEET_INTERFACE_MEMBERCOLOR_VALUE:
                return "参会人员白板颜色";
            case Pb_TYPE_MEET_INTERFACE_MEETCONTEXT_VALUE:
                return "上下文";
            case Pb_TYPE_MEET_INTERFACE_MEETCLEAR_VALUE:
                return "缓存清理,清空所有缓存,其它类型也支持单独";
            case Pb_TYPE_MEET_INTERFACE_MEETSTATISTIC_VALUE:
                return "会议统计";
            case Pb_TYPE_MEET_INTERFACE_MEETFACECONFIG_VALUE:
                return "界面配置";
            case Pb_TYPE_MEET_INTERFACE_MEETSENDMAIL_VALUE:
                return "邮件发送";
            case Pb_TYPE_MEET_INTERFACE_FILESCORE_VALUE:
                return "会议文件评分相关";
            case Pb_TYPE_MEET_INTERFACE_FILEEVALUATE_VALUE:
                return "会议文件评价相关";
            case Pb_TYPE_MEET_INTERFACE_MEETEVALUATE_VALUE:
                return "会议评价相关";
            case Pb_TYPE_MEET_INTERFACE_SYSTEMLOG_VALUE:
                return "管理员操作日志相关";
            case Pb_TYPE_MEET_INTERFACE_DEVICEVALIDATE_VALUE:
                return "设备ID校验";
            case Pb_TYPE_MEET_INTERFACE_SYSTEMFUNCTIONLIMIT_VALUE:
                return "平台功能限制";
            case Pb_TYPE_MEET_INTERFACE_PUBLICINFO_VALUE:
                return "全局字串";
            case Pb_TYPE_MEET_INTERFACE_FILESCOREVOTE_VALUE:
                return "自定义文件评分投票";
            case Pb_TYPE_MEET_INTERFACE_PDFWHITEBOARD_VALUE:
                return "PDF文件多人同时书写";
            case Pb_TYPE_MEET_INTERFACE_FILESCOREVOTESIGN_VALUE:
                return "自定义文件评分投票记名信息";
            case Pb_TYPE_MEET_INTERFACE_ZKIDENTIFY_VALUE:
                return "中控生物认证";
            case Pb_TYPE_MEET_INTERFACE_SMSSERVICE_VALUE:
                return "短信服务";
            case Pb_TYPE_MEET_INTERFACE_UPDATE_VALUE:
                return "升级软件";
            case Pb_TYPE_MEET_INTERFACE_TOPIC_VALUE:
                return "会议议题";
            case Pb_TYPE_MEET_INTERFACE_TOPICGROUP_VALUE:
                return "会议议题参加单位";
            case Pb_TYPE_MEET_INTERFACE_TOPICPERMINSSION_VALUE:
                return "会议议题权限";
            case Pb_TYPE_MEET_INTERFACE_MEETTASK_VALUE:
                return "会议发布任务";
            case Pb_TYPE_MEET_INTERFACE_MEETUSERDEF_VALUE:
                return "会议自定义数据";
            case Pb_TYPE_MEET_INTERFACE_MEETNEWVOTEINFO_VALUE:
                return "会议新投票";
            case Pb_TYPE_MEET_INTERFACE_MEETNEWVOTESIGNED_VALUE:
                return "会议新投票人信息";
            case Pb_TYPE_MEET_INTERFACE_MEETONNEWVOTING_VALUE:
                return "会议发起新投票";
            case Pb_TYPE_MEET_INTERFACE_SEATPLAN_VALUE:
                return "席位方案";
            case Pb_TYPE_MEET_INTERFACE_SEATPLANMEM_VALUE:
                return "席位方案";
            case Pb_TYPE_MEET_INTERFACE_STREAMSAVE_VALUE:
                return "流录制";
            case Pb_TYPE_MEET_INTERFACE_EXITENV_VALUE:
                return "退出释放资源";
            case Pb_TYPE_MEET_INTERFACE_WEBSESSIONID_VALUE:
                return "网页登陆验证";
            default:
                return "";
        }
    }

    public static String getMethodMessage(int method) {
        switch (method) {
            case Pb_METHOD_MEET_INTERFACE_ZERO_VALUE:
                return "";
            case Pb_METHOD_MEET_INTERFACE_QUERY_VALUE:
                return "查询";
            case Pb_METHOD_MEET_INTERFACE_ADD_VALUE:
                return "添加";
            case Pb_METHOD_MEET_INTERFACE_MODIFY_VALUE:
                return "修改";
            case Pb_METHOD_MEET_INTERFACE_DEL_VALUE:
                return "删除";
            case Pb_METHOD_MEET_INTERFACE_SET_VALUE:
                return "设置";
            case Pb_METHOD_MEET_INTERFACE_GETSIZE_VALUE:
                return "获取大小";
            case Pb_METHOD_MEET_INTERFACE_NOTIFY_VALUE:
                return "变更";
            case Pb_METHOD_MEET_INTERFACE_CLEAR_VALUE:
                return "清除";
            case Pb_METHOD_MEET_INTERFACE_LOGON_VALUE:
                return "登录";
            case Pb_METHOD_MEET_INTERFACE_PUSH_VALUE:
                return "推送";
            case Pb_METHOD_MEET_INTERFACE_ASK_VALUE:
                return "Ask 申请";
            case Pb_METHOD_MEET_INTERFACE_REJECT_VALUE:
                return "拒绝";
            case Pb_METHOD_MEET_INTERFACE_EXIT_VALUE:
                return "退出";
            case Pb_METHOD_MEET_INTERFACE_OPEN_VALUE:
                return "打开";
            case Pb_METHOD_MEET_INTERFACE_CLOSE_VALUE:
                return "关闭";
            case Pb_METHOD_MEET_INTERFACE_ENTER_VALUE:
                return "操作";
            case Pb_METHOD_MEET_INTERFACE_PAGEQUERY_VALUE:
                return "分页查询";
            case Pb_METHOD_MEET_INTERFACE_MODIFYNAME_VALUE:
                return "修改名称";
            case Pb_METHOD_MEET_INTERFACE_MODIFYINFO_VALUE:
                return "修改信息";
            case Pb_METHOD_MEET_INTERFACE_MODIFYSTATUS_VALUE:
                return "修改状态";
            case Pb_METHOD_MEET_INTERFACE_SINGLEQUERYBYID_VALUE:
                return "按ID查询";
            case Pb_METHOD_MEET_INTERFACE_SINGLEQUERYBYNAME_VALUE:
                return "按名称查询";
            case Pb_METHOD_MEET_INTERFACE_CONTROL_VALUE:
                return "控制";
            case Pb_METHOD_MEET_INTERFACE_SAVE_VALUE:
                return "保存";
            case Pb_METHOD_MEET_INTERFACE_REFRESH_VALUE:
                return "刷新";
            case Pb_METHOD_MEET_INTERFACE_COMPLEXQUERY_VALUE:
                return "复合查询";
            case Pb_METHOD_MEET_INTERFACE_COMPLEXPAGEQUERY_VALUE:
                return "复合按页查询";
            case Pb_METHOD_MEET_INTERFACE_START_VALUE:
                return "开始";
            case Pb_METHOD_MEET_INTERFACE_STOP_VALUE:
                return "结束";
            case Pb_METHOD_MEET_INTERFACE_PLAY_VALUE:
                return "播放";
            case Pb_METHOD_MEET_INTERFACE_PAUSE_VALUE:
                return "暂停";
            case Pb_METHOD_MEET_INTERFACE_MOVE_VALUE:
                return "移动";
            case Pb_METHOD_MEET_INTERFACE_ZOOM_VALUE:
                return "缩放";
            case Pb_METHOD_MEET_INTERFACE_BACK_VALUE:
                return "返回或撤销";
            case Pb_METHOD_MEET_INTERFACE_REQUEST_VALUE:
                return "要求";
            case Pb_METHOD_MEET_INTERFACE_BROADCAST_VALUE:
                return "广播";
            case Pb_METHOD_MEET_INTERFACE_QUERYPROPERTY_VALUE:
                return "查询属性";
            case Pb_METHOD_MEET_INTERFACE_SETPROPERTY_VALUE:
                return "设置属性";
            case Pb_METHOD_MEET_INTERFACE_DUMP_VALUE:
                return "复制";
            case Pb_METHOD_MEET_INTERFACE_REQUESTPUSH_VALUE:
                return "询问推送";
            case Pb_METHOD_MEET_INTERFACE_DELALL_VALUE:
                return "删除全部";
            case Pb_METHOD_MEET_INTERFACE_SEND_VALUE:
                return "发送";
            case Pb_METHOD_MEET_INTERFACE_DETAILINFO_VALUE:
                return "详细信息";
            case Pb_METHOD_MEET_INTERFACE_INIT_VALUE:
                return "Init 初始";
            case Pb_METHOD_MEET_INTERFACE_DESTORY_VALUE:
                return "Destory";
            case Pb_METHOD_MEET_INTERFACE_MAKEVIDEO_VALUE:
                return "流通道信息";
            case Pb_METHOD_MEET_INTERFACE_SUBMIT_VALUE:
                return "提交";
            case Pb_METHOD_MEET_INTERFACE_PUBLIST_VALUE:
                return "PubList 发布";
            case Pb_METHOD_MEET_INTERFACE_CACHE_VALUE:
                return "缓存";
            case Pb_METHOD_MEET_INTERFACE_CHILDRED_VALUE:
                return "子级数据";
            case Pb_METHOD_MEET_INTERFACE_ALLCHILDRED_VALUE:
                return "所有子级数据";
            case Pb_METHOD_MEET_INTERFACE_RESPONSE_VALUE:
                return "回复";
            case Pb_METHOD_MEET_INTERFACE_REQUESTTOMANAGE_VALUE:
                return "请求管理员";
            case Pb_METHOD_MEET_INTERFACE_RESPONSETOMANAGE_VALUE:
                return "回复请求管理员";
            case Pb_METHOD_MEET_INTERFACE_REQUESTPRIVELIGE_VALUE:
                return "请求参会人员权限";
            case Pb_METHOD_MEET_INTERFACE_RESPONSEPRIVELIGE_VALUE:
                return "回复请求参会人员权限";
            case Pb_METHOD_MEET_INTERFACE_UPDATE_VALUE:
                return "更新、升级";
            case Pb_METHOD_MEET_INTERFACE_TEXTMSG_VALUE:
                return "文本消息";
            case Pb_METHOD_MEET_INTERFACE_REBOOT_VALUE:
                return "重启";
            case Pb_METHOD_MEET_INTERFACE_RESINFO_VALUE:
                return "播放资源信息";
            case Pb_METHOD_MEET_INTERFACE_LOCATE_VALUE:
                return "定位";
            case Pb_METHOD_MEET_INTERFACE_REQUESTINVITE_VALUE:
                return "执行邀请";
            case Pb_METHOD_MEET_INTERFACE_RESPONSEINVITE_VALUE:
                return "回复邀请";
            case Pb_METHOD_MEET_INTERFACE_EXITCHAT_VALUE:
                return "退出对讲";
            case Pb_METHOD_MEET_INTERFACE_REMOTESET_VALUE:
                return "远程配置";
            case Pb_METHOD_MEET_INTERFACE_ADDINK_VALUE:
                return "添加INK";
            case Pb_METHOD_MEET_INTERFACE_ADDRECT_VALUE:
                return "添加矩形、直线、圆形";
            case Pb_METHOD_MEET_INTERFACE_ADDTEXT_VALUE:
                return "添加文本";
            case Pb_METHOD_MEET_INTERFACE_ADDPICTURE_VALUE:
                return "添加图片";
            default:
                return "";
        }
    }

    public static String getRetMessage(int ret) {
        switch (ret) {
            case Pb_ERROR_MEET_INTERFACE_NULL_VALUE:
                return "操作成功，或者数据为空，视操作请求定";
            case Pb_ERROR_MEET_INTERFACE_NOTINIT_VALUE:
                return "未初始化";
            case Pb_ERROR_MEET_INTERFACE_MEMORY_VALUE:
                return "内存分配失败";
            case Pb_ERROR_MEET_INTERFACE_NOSPPORTTYPE_VALUE:
                return "不支持的请求";
            case Pb_ERROR_MEET_INTERFACE_NOSPPORTMETHOD_VALUE:
                return "不支持的请求方法";
            case Pb_ERROR_MEET_INTERFACE_DOWNLOAD_VALUE:
                return "下载失败";
            case Pb_ERROR_MEET_INTERFACE_NETSEND_VALUE:
                return "发送失败";
            case Pb_ERROR_MEET_INTERFACE_NOREADY_VALUE:
                return "数据未准备好,可能正在等待数据返回";
            case Pb_ERROR_MEET_INTERFACE_NOFIND_VALUE:
                return "找不到";
            case Pb_ERROR_MEET_INTERFACE_NOSPPORTPROPERTY_VALUE:
                return "不支持的属性";
            case Pb_ERROR_MEET_INTERFACE_UPPONMAXVALUE_VALUE:
                return "超过最大值";
            case Pb_ERROR_MEET_INTERFACE_ZERO_VALUE:
                return "个数为0";
            case Pb_ERROR_MEET_INTERFACE_PARAMETER_VALUE:
                return "参数错误";
            case Pb_ERROR_MEET_INTERFACE_DATA_VALUE:
                return "数据错误";
            case Pb_ERROR_MEET_INTERFACE_UNAUTHORIZED_VALUE:
                return "功能未授权使用";
            case Pb_ERROR_MEET_INTERFACE_NOCONNECT_VALUE:
                return "短信服务器未响应";
            case Pb_ERROR_MEET_INTERFACE_SOCKET_VALUE:
                return "SOCKET创建失败";
            case Pb_ERROR_MEET_INTERFACE_NAMEORPWD_VALUE:
                return "用户名或密码错误";
            case Pb_ERROR_MEET_INTERFACE_SERVERERR_VALUE:
                return "访问服务异常";
            case Pb_ERROR_MEET_INTERFACE_NOSMSCNT_VALUE:
                return "余额不足";
            case Pb_ERROR_MEET_INTERFACE_OPENFILEERROR_VALUE:
                return "文件打开失败";
            default:
                return "";
        }
    }

    public static String getDBStatusMessage(int status) {
        switch (status) {
            case InterfaceMacro.Pb_DB_StatusCode.Pb_STATUS_MULTIRECORD_VALUE:
                return "多条查询记录";
            case InterfaceMacro.Pb_DB_StatusCode.Pb_STATUS_SINGLERECORDD_VALUE:
                return "单条查询记录";
            case InterfaceMacro.Pb_DB_StatusCode.Pb_STATUS_NORECORED_VALUE:
                return "无返回记录";
            case InterfaceMacro.Pb_DB_StatusCode.Pb_STATUS_DONE_VALUE:
                return "操作成功";
            case InterfaceMacro.Pb_DB_StatusCode.Pb_STATUS_FAIL_VALUE:
                return "请求失败";
            case InterfaceMacro.Pb_DB_StatusCode.Pb_STATUS_EXCPT_DB_VALUE:
                return "数据库异常";
            case InterfaceMacro.Pb_DB_StatusCode.Pb_STATUS_EXCPT_SV_VALUE:
                return "服务器异常";
            case InterfaceMacro.Pb_DB_StatusCode.Pb_STATUS_ACCESSDENIED_VALUE:
                return "权限限制";
            case InterfaceMacro.Pb_DB_StatusCode.Pb_STATUS_PSWFAILED_VALUE:
                return "密码错误";
            case InterfaceMacro.Pb_DB_StatusCode.Pb_STATUS_COLL_MEETING_VALUE:
                return "创建会议有冲突";
            case InterfaceMacro.Pb_DB_StatusCode.Pb_STATUS_PARAMETERZERO_VALUE:
                return "参数错误,不应该为0";
            case InterfaceMacro.Pb_DB_StatusCode.Pb_STATUS_NOTEXIST_VALUE:
                return "不存在的数据";
            case InterfaceMacro.Pb_DB_StatusCode.Pb_STATUS_PROTOLDISMATCH_VALUE:
                return "协议版本不区配";
            default:
                return "";
        }
    }

}
